setZ

open fun setZ(@NonNull view: View, z: Float)(source)

Sets the visual z position of this view, in pixels. This is equivalent to setting the translationZ property to be the difference between the x value passed in and the current elevation property.

Compatibility:

  • API <21: No-op

Parameters

view

view for which to set the position.

z

The visual z position of this view, in pixels.